import React, { Component } from 'react'

export default class App extends Component {
    state = {
        onshow:true
    }
    render() {
    return (
      <div>
          <button onClick={() => {
              this.setState({
                onshow: !this.state.onshow
            })
          }}>{this.state.onshow?"收藏":"取消收藏"}</button>
      </div>
    )
  }
}
